import { createWebHashHistory, createRouter } from 'vue-router'
import MHXY from '../views/mhxy/index.vue'


const routes = [
  { 
    path: '/', 
    component: MHXY,
    redirect: '/mhxy/fszh',
    children: [
      { 
        path: '/mhxy/fszh', 
        component: () => import('../views/mhxy/fszh/index.vue'),
        redirect: '/mhxy/fszh/fszl',
        children: [
          { path: '/mhxy/fszh/fszl', component: () => import('../views/mhxy/fszh/fszl/index.vue') },
          { path: '/mhxy/fszh/gushang', component: () => import('../views/mhxy/fszh/gushang/index.vue') },
          { path: '/mhxy/fszh/faxi', component: () => import('../views/mhxy/fszh/faxi/index.vue') },
          { path: '/mhxy/fszh/wuli', component: () => import('../views/mhxy/fszh/wuli/index.vue') }
        ]
      },{ 
        path: '/mhxy/qjbm', 
        component: () => import('../views/mhxy/qjbm/index.vue'),
        redirect: '/mhxy/qjbm/gushang',
        children: [
          { path: '/mhxy/qjbm/gushang', component: () => import('../views/mhxy/qjbm/gushang/index.vue') },
          { path: '/mhxy/qjbm/faxi', component: () => import('../views/mhxy/qjbm/faxi/index.vue') },
          { path: '/mhxy/qjbm/wuli', component: () => import('../views/mhxy/qjbm/wuli/index.vue') }
        ]
      },{ 
        path: '/mhxy/zbtj', 
        component: () => import('../views/mhxy/zbtj/index.vue'),
        redirect: '/mhxy/zbtj/gushang',
        children: [
          { path: '/mhxy/zbtj/gushang', component: () => import('../views/mhxy/zbtj/gushang/index.vue') },
          { path: '/mhxy/zbtj/faxi', component: () => import('../views/mhxy/zbtj/faxi/index.vue') },
          { path: '/mhxy/zbtj/wuli', component: () => import('../views/mhxy/zbtj/wuli/index.vue') }
        ]
      },{ 
        path: '/mhxy/zbtz', 
        component: () => import('../views/mhxy/zbtz/index.vue'),
        redirect: '/mhxy/zbtz/gushang',
        children: [
          { path: '/mhxy/zbtz/liliang', component: () => import('../views/mhxy/zbtz/liliang/index.vue') },
          { path: '/mhxy/zbtz/moli', component: () => import('../views/mhxy/zbtz/moli/index.vue') },
          { path: '/mhxy/zbtz/tizhi', component: () => import('../views/mhxy/zbtz/tizhi/index.vue') },
          { path: '/mhxy/zbtz/minjie', component: () => import('../views/mhxy/zbtz/minjie/index.vue') },
          { path: '/mhxy/zbtz/naili', component: () => import('../views/mhxy/zbtz/naili/index.vue') }
        ]
      },
    ]
  },
  { path: '/login', component: () => import('../views/login/index.vue') },
  { path: '/404', component: () => import('../views/404/index.vue') },
  { path: '/:pathMatch(.*)*', redirect: '/404' },
]

const router = createRouter({
  history: createWebHashHistory(),
  routes,
})

export default router